<template>
  <el-dialog title="任务执行记录" :visible.sync="open" width="700px">
    <el-pagination
      style="float: right;"
      layout="prev, pager, next"
      :page-size="formData.pageSize"
      @current-change="current"
      :total="formData.total"
    ></el-pagination>
    <el-table :data="tableData" v-loading="loading" style="width: 100%">
      <el-table-column prop="logId" label="任务ID"></el-table-column>
      <el-table-column prop="orderId" label="执行订单号"></el-table-column>
      <el-table-column prop="status" label="是否邀评成功">
        <template slot-scope="scope">{{scope.row.status?'失败':'成功'}}</template>
      </el-table-column>
    </el-table>
    <div slot="footer" class="dialog-footer">
      <el-button type="primary" @click="open = false" size="small">关闭</el-button>
    </div>
  </el-dialog>
</template>
<script>
import { reviewoperlogList } from "@/api/reviewPlanController";
export default {
  data() {
    return {
      open: false,
      tableData: [],
      loading: false,
      formData: {
        pageNum: 1,
        pageSize: 10,
        total: 1,
        taskId: 0,
      },
    };
  },
  methods: {
    show(row) {
      this.formData.taskId = row.taskId;
      this.open = true;
      this.loading = true;
      this.getreviewoperlogList();
    },
    getreviewoperlogList() {
      reviewoperlogList(this.formData).then((res) => {
        this.loading = false;
        this.formData.total = res.data.data.total;
        this.tableData = res.data.data.rows;
      });
    },
    current(pageNum) {
      this.formData.pageNum = pageNum;
      this.getreviewoperlogList();
    },
  },
};
</script>
<style lang="scss" scoped>
.el-date-editor {
  width: 100%;
}
</style>